#!/bin/python3
# -*- coding:utf-8 -*-
"""
    微服务API模板
    Add By :陈狍子 e4ting@qq.com
"""
from flask_restful import Api,Resource

from app.flaskapp import webapp
from e4ting       import log
api = Api(webapp)


from v6.token import WebToken
api.add_resource(WebToken,
    "/api/v6/token",
    "/api/v6/token/<string:id>",
    )
log.info(""" /api/v6/token  /api/v6/token/<string:id>  WebToken""")

from v6.game.room import WebRoom
api.add_resource(WebRoom,
    "/api/v6/game/room",
    "/api/v6/game/room/<string:id>",
    )
log.info(""" /api/v6/game/room  /api/v6/game/room/<string:id>  WebRoom""")

from v6.game.roomnames import WebRoomNames
api.add_resource(WebRoomNames,
    "/api/v6/game/roomnames",
    "/api/v6/game/roomnames/<string:id>",
    )
log.info(""" /api/v6/game/roomnames  /api/v6/game/roomnames/<string:id>  WebRoomNames""")

from v6.game.listroom import WebListRoom
api.add_resource(WebListRoom,
    "/api/v6/game/listroom",
    "/api/v6/game/listroom/<string:id>",
    )
log.info(""" /api/v6/game/listroom  /api/v6/game/listroom/<string:id>  WebListRoom""")

from v6.game.roomseat import WebRoomSeat
api.add_resource(WebRoomSeat,
    "/api/v6/game/roomseat",
    "/api/v6/game/roomseat/<string:id>",
    )
log.info(""" /api/v6/game/roomseat  /api/v6/game/roomseat/<string:id>  WebRoomSeat""")

from v6.game.joinroom import WebJoinRoom
api.add_resource(WebJoinRoom,
    "/api/v6/game/joinroom",
    "/api/v6/game/joinroom/<string:id>",
    )
log.info(""" /api/v6/game/joinroom  /api/v6/game/joinroom/<string:id>  WebJoinRoom""")

